.class public Lcom/zuiapps/suite/utils/file/IOUtil;
.super Ljava/lang/Object;
.source "IOUtil.java"


# static fields
.field public static final FS:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 39
    sget-object v0, Ljava/io/File;->separator:Ljava/lang/String;

    sput-object v0, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 37
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static addToSysGallery(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)Z
    .registers 5
    .param p0, "activity"    # Landroid/app/Activity;
    .param p1, "fileAbsolutePath"    # Ljava/lang/String;
    .param p2, "fileName"    # Ljava/lang/String;

    .prologue
    .line 354
    :try_start_0
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    invoke-static {v1, p1, p2, p2}, Landroid/provider/MediaStore$Images$Media;->insertImage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_7
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_7} :catch_9

    .line 355
    const/4 v1, 0x1

    .line 357
    :goto_8
    return v1

    .line 356
    :catch_9
    move-exception v0

    .line 357
    .local v0, "e":Ljava/io/FileNotFoundException;
    const/4 v1, 0x0

    goto :goto_8
.end method

.method private static closeStream(Ljava/io/Closeable;)V
    .registers 2
    .param p0, "stream"    # Ljava/io/Closeable;

    .prologue
    .line 141
    if-eqz p0, :cond_5

    .line 143
    :try_start_2
    invoke-interface {p0}, Ljava/io/Closeable;->close()V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_5} :catch_6

    .line 147
    :cond_5
    :goto_5
    return-void

    .line 144
    :catch_6
    move-exception v0

    goto :goto_5
.end method

.method public static convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    .registers 7
    .param p0, "is"    # Ljava/io/InputStream;

    .prologue
    .line 76
    new-instance v2, Ljava/io/BufferedReader;

    new-instance v4, Ljava/io/InputStreamReader;

    invoke-direct {v4, p0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    const/16 v5, 0x2000

    invoke-direct {v2, v4, v5}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

    .line 77
    .local v2, "reader":Ljava/io/BufferedReader;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    .line 79
    .local v3, "sb":Ljava/lang/StringBuilder;
    const/4 v1, 0x0

    .line 81
    .local v1, "line":Ljava/lang/String;
    :goto_12
    :try_start_12
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3f

    .line 82
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\n"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_12 .. :try_end_2e} :catch_2f
    .catchall {:try_start_12 .. :try_end_2e} :catchall_45

    goto :goto_12

    .line 84
    :catch_2f
    move-exception v0

    .line 85
    .local v0, "e":Ljava/io/IOException;
    :try_start_30
    const-string v4, "convertStreamToString"

    const-string v5, "convertStreamToString error"

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_37
    .catchall {:try_start_30 .. :try_end_37} :catchall_45

    .line 88
    :try_start_37
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_37 .. :try_end_3a} :catch_4a

    .line 93
    .end local v0    # "e":Ljava/io/IOException;
    :goto_3a
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    return-object v4

    .line 88
    :cond_3f
    :try_start_3f
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_42
    .catch Ljava/io/IOException; {:try_start_3f .. :try_end_42} :catch_43

    goto :goto_3a

    .line 89
    :catch_43
    move-exception v4

    goto :goto_3a

    .line 87
    :catchall_45
    move-exception v4

    .line 88
    :try_start_46
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_49
    .catch Ljava/io/IOException; {:try_start_46 .. :try_end_49} :catch_4c

    .line 90
    :goto_49
    throw v4

    .line 89
    .restart local v0    # "e":Ljava/io/IOException;
    :catch_4a
    move-exception v4

    goto :goto_3a

    .end local v0    # "e":Ljava/io/IOException;
    :catch_4c
    move-exception v5

    goto :goto_49
.end method

.method private static copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
    .registers 5
    .param p0, "in"    # Ljava/io/InputStream;
    .param p1, "out"    # Ljava/io/OutputStream;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 133
    const/16 v2, 0x1000

    new-array v0, v2, [B

    .line 135
    .local v0, "b":[B
    :goto_4
    invoke-virtual {p0, v0}, Ljava/io/InputStream;->read([B)I

    move-result v1

    .local v1, "read":I
    const/4 v2, -0x1

    if-eq v1, v2, :cond_10

    .line 136
    const/4 v2, 0x0

    invoke-virtual {p1, v0, v2, v1}, Ljava/io/OutputStream;->write([BII)V

    goto :goto_4

    .line 138
    :cond_10
    return-void
.end method

.method public static copyAssetsFile(Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)V
    .registers 9
    .param p0, "outFilePath"    # Ljava/lang/String;
    .param p1, "assetFile"    # Ljava/lang/String;
    .param p2, "context"    # Landroid/content/Context;

    .prologue
    .line 384
    :try_start_0
    new-instance v4, Ljava/io/FileOutputStream;

    invoke-direct {v4, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 385
    .local v4, "myOutput":Ljava/io/OutputStream;
    invoke-virtual {p2}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v5

    invoke-virtual {v5, p1}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v3

    .line 386
    .local v3, "myInput":Ljava/io/InputStream;
    const/16 v5, 0x400

    new-array v0, v5, [B

    .line 388
    .local v0, "buffer":[B
    :goto_11
    invoke-virtual {v3, v0}, Ljava/io/InputStream;->read([B)I

    move-result v2

    .local v2, "length":I
    if-lez v2, :cond_21

    .line 389
    const/4 v5, 0x0

    invoke-virtual {v4, v0, v5, v2}, Ljava/io/OutputStream;->write([BII)V
    :try_end_1b
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_1b} :catch_1c
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_1b} :catch_2b

    goto :goto_11

    .line 394
    .end local v0    # "buffer":[B
    .end local v2    # "length":I
    .end local v3    # "myInput":Ljava/io/InputStream;
    .end local v4    # "myOutput":Ljava/io/OutputStream;
    :catch_1c
    move-exception v1

    .line 395
    .local v1, "e":Ljava/io/FileNotFoundException;
    invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V

    .line 400
    .end local v1    # "e":Ljava/io/FileNotFoundException;
    :goto_20
    return-void

    .line 391
    .restart local v0    # "buffer":[B
    .restart local v2    # "length":I
    .restart local v3    # "myInput":Ljava/io/InputStream;
    .restart local v4    # "myOutput":Ljava/io/OutputStream;
    :cond_21
    :try_start_21
    invoke-virtual {v4}, Ljava/io/OutputStream;->flush()V

    .line 392
    invoke-virtual {v3}, Ljava/io/InputStream;->close()V

    .line 393
    invoke-virtual {v4}, Ljava/io/OutputStream;->close()V
    :try_end_2a
    .catch Ljava/io/FileNotFoundException; {:try_start_21 .. :try_end_2a} :catch_1c
    .catch Ljava/io/IOException; {:try_start_21 .. :try_end_2a} :catch_2b

    goto :goto_20

    .line 396
    .end local v0    # "buffer":[B
    .end local v2    # "length":I
    .end local v3    # "myInput":Ljava/io/InputStream;
    .end local v4    # "myOutput":Ljava/io/OutputStream;
    :catch_2b
    move-exception v1

    .line 397
    .local v1, "e":Ljava/io/IOException;
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_20
.end method

.method public static deleteFolder(Ljava/io/File;)V
    .registers 8
    .param p0, "folder"    # Ljava/io/File;

    .prologue
    .line 362
    invoke-virtual {p0}, Ljava/io/File;->list()[Ljava/lang/String;

    move-result-object v2

    .line 363
    .local v2, "childs":[Ljava/lang/String;
    if-eqz v2, :cond_9

    array-length v5, v2

    if-gtz v5, :cond_c

    .line 364
    :cond_9
    invoke-virtual {p0}, Ljava/io/File;->delete()Z

    .line 366
    :cond_c
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_d
    array-length v5, v2

    if-ge v4, v5, :cond_54

    .line 367
    aget-object v0, v2, v4

    .line 368
    .local v0, "childName":Ljava/lang/String;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 369
    .local v1, "childPath":Ljava/lang/String;
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 370
    .local v3, "filePath":Ljava/io/File;
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_44

    invoke-virtual {v3}, Ljava/io/File;->isFile()Z

    move-result v5

    if-eqz v5, :cond_44

    .line 371
    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    .line 366
    :cond_41
    :goto_41
    add-int/lit8 v4, v4, 0x1

    goto :goto_d

    .line 372
    :cond_44
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_41

    invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z

    move-result v5

    if-eqz v5, :cond_41

    .line 373
    invoke-static {v3}, Lcom/zuiapps/suite/utils/file/IOUtil;->deleteFolder(Ljava/io/File;)V

    goto :goto_41

    .line 377
    .end local v0    # "childName":Ljava/lang/String;
    .end local v1    # "childPath":Ljava/lang/String;
    .end local v3    # "filePath":Ljava/io/File;
    :cond_54
    invoke-virtual {p0}, Ljava/io/File;->delete()Z

    .line 378
    return-void
.end method

.method public static getBaseLocalLocation(Landroid/content/Context;)Ljava/lang/String;
    .registers 4
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 322
    invoke-static {}, Lcom/zuiapps/suite/utils/file/IOUtil;->getExternalStorageState()Z

    move-result v1

    .line 323
    .local v1, "isSDCanRead":Z
    const-string v0, ""

    .line 324
    .local v0, "baseLocation":Ljava/lang/String;
    if-eqz v1, :cond_d

    .line 325
    invoke-static {}, Lcom/zuiapps/suite/utils/file/IOUtil;->getSDCardPath()Ljava/lang/String;

    move-result-object v0

    .line 329
    :goto_c
    return-object v0

    .line 327
    :cond_d
    invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v2

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    goto :goto_c
.end method

.method public static getBitmapFromUrl(Ljava/net/URL;)Landroid/graphics/Bitmap;
    .registers 11
    .param p0, "url"    # Ljava/net/URL;

    .prologue
    .line 97
    const/4 v0, 0x0

    .line 98
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    const/4 v4, 0x0

    .line 99
    .local v4, "in":Ljava/io/InputStream;
    const/4 v6, 0x0

    .line 102
    .local v6, "out":Ljava/io/OutputStream;
    :try_start_3
    new-instance v5, Ljava/io/BufferedInputStream;

    invoke-virtual {p0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

    move-result-object v8

    const/16 v9, 0x1000

    invoke-direct {v5, v8, v9}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;I)V
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_e} :catch_39
    .catchall {:try_start_3 .. :try_end_e} :catchall_42

    .line 104
    .end local v4    # "in":Ljava/io/InputStream;
    .local v5, "in":Ljava/io/InputStream;
    :try_start_e
    new-instance v3, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 105
    .local v3, "dataStream":Ljava/io/ByteArrayOutputStream;
    new-instance v7, Ljava/io/BufferedOutputStream;

    const/16 v8, 0x1000

    invoke-direct {v7, v3, v8}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;I)V
    :try_end_1a
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_1a} :catch_51
    .catchall {:try_start_e .. :try_end_1a} :catchall_4a

    .line 106
    .end local v6    # "out":Ljava/io/OutputStream;
    .local v7, "out":Ljava/io/OutputStream;
    :try_start_1a
    invoke-static {v5, v7}, Lcom/zuiapps/suite/utils/file/IOUtil;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V

    .line 107
    invoke-virtual {v7}, Ljava/io/OutputStream;->flush()V

    .line 109
    invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v2

    .line 110
    .local v2, "data":[B
    new-instance v1, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 111
    .local v1, "bitmapOptions":Landroid/graphics/BitmapFactory$Options;
    const/4 v8, 0x0

    array-length v9, v2

    invoke-static {v2, v8, v9, v1}, Landroid/graphics/BitmapFactory;->decodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_1a .. :try_end_2e} :catch_54
    .catchall {:try_start_1a .. :try_end_2e} :catchall_4d

    move-result-object v0

    .line 115
    invoke-static {v5}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 116
    invoke-static {v7}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    move-object v8, v0

    .line 118
    .end local v1    # "bitmapOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v2    # "data":[B
    .end local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    :goto_38
    return-object v8

    .line 113
    :catch_39
    move-exception v8

    .line 115
    :goto_3a
    invoke-static {v4}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 116
    invoke-static {v6}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 118
    const/4 v8, 0x0

    goto :goto_38

    .line 115
    :catchall_42
    move-exception v8

    :goto_43
    invoke-static {v4}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 116
    invoke-static {v6}, Lcom/zuiapps/suite/utils/file/IOUtil;->closeStream(Ljava/io/Closeable;)V

    throw v8

    .line 115
    .end local v4    # "in":Ljava/io/InputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    :catchall_4a
    move-exception v8

    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_43

    .end local v4    # "in":Ljava/io/InputStream;
    .end local v6    # "out":Ljava/io/OutputStream;
    .restart local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    .restart local v7    # "out":Ljava/io/OutputStream;
    :catchall_4d
    move-exception v8

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_43

    .line 113
    .end local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .end local v4    # "in":Ljava/io/InputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    :catch_51
    move-exception v8

    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_3a

    .end local v4    # "in":Ljava/io/InputStream;
    .end local v6    # "out":Ljava/io/OutputStream;
    .restart local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    .restart local v7    # "out":Ljava/io/OutputStream;
    :catch_54
    move-exception v8

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_3a
.end method

.method public static getDrawableFromUrl(Ljava/net/URL;)Landroid/graphics/drawable/Drawable;
    .registers 4
    .param p0, "url"    # Ljava/net/URL;

    .prologue
    .line 123
    :try_start_0
    invoke-virtual {p0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

    move-result-object v1

    .line 124
    .local v1, "is":Ljava/io/InputStream;
    const-string v2, "src"

    invoke-static {v1, v2}, Landroid/graphics/drawable/Drawable;->createFromStream(Ljava/io/InputStream;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
    :try_end_9
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_9} :catch_e
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_9} :catch_b

    move-result-object v0

    .line 129
    .end local v1    # "is":Ljava/io/InputStream;
    :goto_a
    return-object v0

    .line 127
    :catch_b
    move-exception v2

    .line 129
    :goto_c
    const/4 v0, 0x0

    goto :goto_a

    .line 126
    :catch_e
    move-exception v2

    goto :goto_c
.end method

.method public static getExtentionName(Ljava/lang/String;)Ljava/lang/String;
    .registers 3
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 312
    if-eqz p0, :cond_20

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_20

    .line 313
    const/16 v1, 0x2e

    invoke-virtual {p0, v1}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v0

    .line 314
    .local v0, "dot":I
    const/4 v1, -0x1

    if-le v0, v1, :cond_20

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    if-ge v0, v1, :cond_20

    .line 315
    add-int/lit8 v1, v0, 0x1

    invoke-virtual {p0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v1

    .line 318
    .end local v0    # "dot":I
    :goto_1f
    return-object v1

    :cond_20
    const/4 v1, 0x0

    goto :goto_1f
.end method

.method public static getExternalStorageState()Z
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 278
    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v0

    .line 279
    .local v0, "state":Ljava/lang/String;
    const-string v2, "mounted"

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_f

    .line 280
    const/4 v1, 0x1

    .line 284
    :cond_e
    :goto_e
    return v1

    .line 281
    :cond_f
    const-string v2, "mounted_ro"

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_e

    goto :goto_e
.end method

.method public static getFilePathByDB(Landroid/app/Activity;Landroid/net/Uri;)Ljava/lang/String;
    .registers 10
    .param p0, "activity"    # Landroid/app/Activity;
    .param p1, "uri"    # Landroid/net/Uri;

    .prologue
    .line 404
    const/4 v0, 0x1

    :try_start_1
    new-array v2, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    const-string v1, "_data"

    aput-object v1, v2, v0

    .line 406
    .local v2, "proj":[Ljava/lang/String;
    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    invoke-virtual/range {v0 .. v5}, Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 407
    .local v7, "cursor":Landroid/database/Cursor;
    const-string v0, "_data"

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v6

    .line 408
    .local v6, "column_index":I
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    .line 409
    invoke-interface {v7, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
    :try_end_1d
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1d} :catch_1f

    move-result-object v0

    .line 413
    .end local v2    # "proj":[Ljava/lang/String;
    .end local v6    # "column_index":I
    .end local v7    # "cursor":Landroid/database/Cursor;
    :goto_1e
    return-object v0

    .line 410
    :catch_1f
    move-exception v0

    .line 413
    const-string v0, ""

    goto :goto_1e
.end method

.method public static getFileSize(Ljava/io/File;)I
    .registers 6
    .param p0, "file"    # Ljava/io/File;

    .prologue
    .line 333
    const/4 v1, 0x0

    .line 334
    .local v1, "fis":Ljava/io/FileInputStream;
    const/4 v3, 0x0

    .line 336
    .local v3, "size":I
    :try_start_2
    new-instance v2, Ljava/io/FileInputStream;

    invoke-direct {v2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_7
    .catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_7} :catch_16
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_7} :catch_23
    .catchall {:try_start_2 .. :try_end_7} :catchall_30

    .line 337
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .local v2, "fis":Ljava/io/FileInputStream;
    :try_start_7
    invoke-virtual {v2}, Ljava/io/FileInputStream;->available()I
    :try_end_a
    .catch Ljava/io/FileNotFoundException; {:try_start_7 .. :try_end_a} :catch_40
    .catch Ljava/io/IOException; {:try_start_7 .. :try_end_a} :catch_3d
    .catchall {:try_start_7 .. :try_end_a} :catchall_3a

    move-result v3

    .line 344
    :try_start_b
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_e} :catch_10

    move-object v1, v2

    .line 349
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    :goto_f
    return v3

    .line 345
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_10
    move-exception v0

    .line 346
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    move-object v1, v2

    .line 348
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_f

    .line 338
    .end local v0    # "e":Ljava/io/IOException;
    :catch_16
    move-exception v0

    .line 339
    .local v0, "e":Ljava/io/FileNotFoundException;
    :goto_17
    :try_start_17
    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_1a
    .catchall {:try_start_17 .. :try_end_1a} :catchall_30

    .line 344
    :try_start_1a
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_1d
    .catch Ljava/io/IOException; {:try_start_1a .. :try_end_1d} :catch_1e

    goto :goto_f

    .line 345
    :catch_1e
    move-exception v0

    .line 346
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_f

    .line 340
    .end local v0    # "e":Ljava/io/IOException;
    :catch_23
    move-exception v0

    .line 341
    .restart local v0    # "e":Ljava/io/IOException;
    :goto_24
    :try_start_24
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
    :try_end_27
    .catchall {:try_start_24 .. :try_end_27} :catchall_30

    .line 344
    :try_start_27
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_2a
    .catch Ljava/io/IOException; {:try_start_27 .. :try_end_2a} :catch_2b

    goto :goto_f

    .line 345
    :catch_2b
    move-exception v0

    .line 346
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_f

    .line 343
    .end local v0    # "e":Ljava/io/IOException;
    :catchall_30
    move-exception v4

    .line 344
    :goto_31
    :try_start_31
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_34
    .catch Ljava/io/IOException; {:try_start_31 .. :try_end_34} :catch_35

    .line 347
    :goto_34
    throw v4

    .line 345
    :catch_35
    move-exception v0

    .line 346
    .restart local v0    # "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_34

    .line 343
    .end local v0    # "e":Ljava/io/IOException;
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catchall_3a
    move-exception v4

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_31

    .line 340
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_3d
    move-exception v0

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_24

    .line 338
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_40
    move-exception v0

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_17
.end method

.method public static getPathName(Ljava/lang/String;)Ljava/lang/String;
    .registers 2
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 308
    const-string v0, "/"

    invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getSDCardPath()Ljava/lang/String;
    .registers 1

    .prologue
    .line 289
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getUrlResponse(Ljava/lang/String;)Ljava/lang/String;
    .registers 6
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 43
    :try_start_0
    new-instance v2, Lorg/apache/http/client/methods/HttpGet;

    invoke-direct {v2, p0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 44
    .local v2, "get":Lorg/apache/http/client/methods/HttpGet;
    new-instance v0, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v0}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 45
    .local v0, "client":Lorg/apache/http/client/HttpClient;
    invoke-interface {v0, v2}, Lorg/apache/http/client/HttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v3

    .line 46
    .local v3, "response":Lorg/apache/http/HttpResponse;
    invoke-interface {v3}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v1

    .line 47
    .local v1, "entity":Lorg/apache/http/HttpEntity;
    invoke-interface {v1}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/file/IOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    :try_end_19
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_19} :catch_1b

    move-result-object v4

    .line 50
    .end local v0    # "client":Lorg/apache/http/client/HttpClient;
    .end local v1    # "entity":Lorg/apache/http/HttpEntity;
    .end local v2    # "get":Lorg/apache/http/client/methods/HttpGet;
    .end local v3    # "response":Lorg/apache/http/HttpResponse;
    :goto_1a
    return-object v4

    .line 48
    :catch_1b
    move-exception v4

    .line 50
    const/4 v4, 0x0

    goto :goto_1a
.end method

.method public static isDirExist(Ljava/lang/String;)Z
    .registers 3
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    .line 298
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 299
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_13

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v1

    if-eqz v1, :cond_13

    const/4 v1, 0x1

    :goto_12
    return v1

    :cond_13
    const/4 v1, 0x0

    goto :goto_12
.end method

.method public static isFileExist(Ljava/lang/String;)Z
    .registers 3
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    .line 293
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 294
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_13

    invoke-virtual {v0}, Ljava/io/File;->isFile()Z

    move-result v1

    if-eqz v1, :cond_13

    const/4 v1, 0x1

    :goto_12
    return v1

    :cond_13
    const/4 v1, 0x0

    goto :goto_12
.end method

.method public static makeDirs(Ljava/lang/String;)Z
    .registers 3
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    .line 303
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 304
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v1

    return v1
.end method

.method public static saveFile([BLjava/lang/String;Ljava/lang/String;)Z
    .registers 12
    .param p0, "fileStream"    # [B
    .param p1, "relativePath"    # Ljava/lang/String;
    .param p2, "basePath"    # Ljava/lang/String;

    .prologue
    .line 150
    const/4 v0, 0x0

    .line 151
    .local v0, "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    const/4 v3, 0x0

    .line 152
    .local v3, "fileOutputStream":Ljava/io/FileOutputStream;
    const/4 v6, 0x1

    .line 154
    .local v6, "isSaveSucc":Z
    :try_start_3
    new-instance v1, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v1}, Ljava/io/ByteArrayOutputStream;-><init>()V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_8} :catch_44
    .catchall {:try_start_3 .. :try_end_8} :catchall_4b

    .line 155
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .local v1, "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    const/4 v5, 0x0

    .local v5, "i":I
    :goto_9
    :try_start_9
    array-length v7, p0

    if-ge v5, v7, :cond_14

    .line 156
    aget-byte v7, p0, v5

    invoke-virtual {v1, v7}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 155
    add-int/lit8 v5, v5, 0x1

    goto :goto_9

    .line 158
    :cond_14
    new-instance v4, Ljava/io/FileOutputStream;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-direct {v4, v7}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V
    :try_end_30
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_30} :catch_58
    .catchall {:try_start_9 .. :try_end_30} :catchall_51

    .line 159
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .local v4, "fileOutputStream":Ljava/io/FileOutputStream;
    :try_start_30
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v7

    invoke-virtual {v4, v7}, Ljava/io/FileOutputStream;->write([B)V

    .line 160
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->close()V

    .line 161
    invoke-virtual {v4}, Ljava/io/FileOutputStream;->close()V
    :try_end_3d
    .catch Ljava/lang/Exception; {:try_start_30 .. :try_end_3d} :catch_5b
    .catchall {:try_start_30 .. :try_end_3d} :catchall_54

    .line 165
    const/4 p0, 0x0

    .line 166
    invoke-static {}, Ljava/lang/System;->gc()V

    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .line 168
    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v5    # "i":I
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    :goto_43
    return v6

    .line 162
    :catch_44
    move-exception v2

    .line 163
    .local v2, "e":Ljava/lang/Exception;
    :goto_45
    const/4 v6, 0x0

    .line 165
    const/4 p0, 0x0

    .line 166
    invoke-static {}, Ljava/lang/System;->gc()V

    goto :goto_43

    .line 165
    .end local v2    # "e":Ljava/lang/Exception;
    :catchall_4b
    move-exception v7

    :goto_4c
    const/4 p0, 0x0

    .line 166
    invoke-static {}, Ljava/lang/System;->gc()V

    throw v7

    .line 165
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "i":I
    :catchall_51
    move-exception v7

    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_4c

    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    :catchall_54
    move-exception v7

    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_4c

    .line 162
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    :catch_58
    move-exception v2

    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_45

    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    :catch_5b
    move-exception v2

    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_45
.end method

.method public static saveImageFile(Landroid/content/Context;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;)Z
    .registers 12
    .param p0, "activity"    # Landroid/content/Context;
    .param p1, "bitmap"    # Landroid/graphics/Bitmap;
    .param p2, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p3, "relativePath"    # Ljava/lang/String;
    .param p4, "basePath"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 172
    if-nez p1, :cond_4

    .line 192
    :goto_3
    return v4

    .line 174
    :cond_4
    const/4 v2, 0x0

    .line 175
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 176
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 177
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 180
    :cond_32
    :try_start_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_37} :catch_44

    .line 182
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    const/16 v5, 0x64

    :try_start_39
    invoke-virtual {p1, p2, v5, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 183
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 184
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_42
    .catch Ljava/lang/Exception; {:try_start_39 .. :try_end_42} :catch_46

    .line 192
    const/4 v4, 0x1

    goto :goto_3

    .line 189
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_44
    move-exception v0

    .line 190
    .local v0, "e":Ljava/lang/Exception;
    :goto_45
    goto :goto_3

    .line 189
    .end local v0    # "e":Ljava/lang/Exception;
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_46
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_45
.end method

.method public static saveImageFile(Landroid/content/Context;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;I)Z
    .registers 13
    .param p0, "activity"    # Landroid/content/Context;
    .param p1, "bitmap"    # Landroid/graphics/Bitmap;
    .param p2, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p3, "relativePath"    # Ljava/lang/String;
    .param p4, "basePath"    # Ljava/lang/String;
    .param p5, "quality"    # I

    .prologue
    const/4 v4, 0x0

    .line 196
    if-nez p1, :cond_4

    .line 216
    :goto_3
    return v4

    .line 198
    :cond_4
    const/4 v2, 0x0

    .line 199
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 200
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 201
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 204
    :cond_32
    :try_start_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_37} :catch_42

    .line 206
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    :try_start_37
    invoke-virtual {p1, p2, p5, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 207
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 208
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_40
    .catch Ljava/lang/Exception; {:try_start_37 .. :try_end_40} :catch_44

    .line 216
    const/4 v4, 0x1

    goto :goto_3

    .line 213
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_42
    move-exception v0

    .line 214
    .local v0, "e":Ljava/lang/Exception;
    :goto_43
    goto :goto_3

    .line 213
    .end local v0    # "e":Ljava/lang/Exception;
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_44
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_43
.end method

.method public static saveImageFile(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;)Z
    .registers 11
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p2, "relativePath"    # Ljava/lang/String;
    .param p3, "basePath"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 220
    if-nez p0, :cond_4

    .line 244
    :goto_3
    return v4

    .line 222
    :cond_4
    const/4 v2, 0x0

    .line 223
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 224
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 225
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 228
    :cond_32
    :try_start_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_37} :catch_45
    .catch Ljava/lang/Throwable; {:try_start_32 .. :try_end_37} :catch_48
    .catchall {:try_start_32 .. :try_end_37} :catchall_4b

    .line 230
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    const/16 v5, 0x64

    :try_start_39
    invoke-virtual {p0, p1, v5, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 231
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 232
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_42
    .catch Ljava/lang/Exception; {:try_start_39 .. :try_end_42} :catch_54
    .catch Ljava/lang/Throwable; {:try_start_39 .. :try_end_42} :catch_51
    .catchall {:try_start_39 .. :try_end_42} :catchall_4e

    .line 242
    const/4 v2, 0x0

    .line 244
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    const/4 v4, 0x1

    goto :goto_3

    .line 237
    :catch_45
    move-exception v0

    .line 242
    .local v0, "e":Ljava/lang/Exception;
    :goto_46
    const/4 v2, 0x0

    goto :goto_3

    .line 239
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_48
    move-exception v0

    .line 242
    .local v0, "e":Ljava/lang/Throwable;
    :goto_49
    const/4 v2, 0x0

    goto :goto_3

    .end local v0    # "e":Ljava/lang/Throwable;
    :catchall_4b
    move-exception v4

    :goto_4c
    const/4 v2, 0x0

    throw v4

    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catchall_4e
    move-exception v4

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_4c

    .line 239
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_51
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_49

    .line 237
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_54
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_46
.end method

.method public static saveImageFile(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;I)Z
    .registers 12
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p2, "relativePath"    # Ljava/lang/String;
    .param p3, "basePath"    # Ljava/lang/String;
    .param p4, "quality"    # I

    .prologue
    const/4 v4, 0x0

    .line 248
    if-nez p0, :cond_4

    .line 274
    :goto_3
    return v4

    .line 251
    :cond_4
    const/4 v2, 0x0

    .line 253
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    :try_start_5
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/suite/utils/file/IOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 254
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 255
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 258
    :cond_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_37} :catch_43
    .catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_37} :catch_46
    .catchall {:try_start_5 .. :try_end_37} :catchall_49

    .line 260
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    :try_start_37
    invoke-virtual {p0, p1, p4, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 261
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 262
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_40
    .catch Ljava/lang/Exception; {:try_start_37 .. :try_end_40} :catch_52
    .catch Ljava/lang/Throwable; {:try_start_37 .. :try_end_40} :catch_4f
    .catchall {:try_start_37 .. :try_end_40} :catchall_4c

    .line 272
    const/4 v2, 0x0

    .line 274
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    const/4 v4, 0x1

    goto :goto_3

    .line 267
    .end local v1    # "file":Ljava/io/File;
    :catch_43
    move-exception v0

    .line 272
    .local v0, "e":Ljava/lang/Exception;
    :goto_44
    const/4 v2, 0x0

    goto :goto_3

    .line 269
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_46
    move-exception v0

    .line 272
    .local v0, "e":Ljava/lang/Throwable;
    :goto_47
    const/4 v2, 0x0

    goto :goto_3

    .end local v0    # "e":Ljava/lang/Throwable;
    :catchall_49
    move-exception v4

    :goto_4a
    const/4 v2, 0x0

    throw v4

    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v1    # "file":Ljava/io/File;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catchall_4c
    move-exception v4

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_4a

    .line 269
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_4f
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_47

    .line 267
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_52
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_44
.end method

.method public static unGzip(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
    .registers 7
    .param p0, "compressedEntity"    # Lorg/apache/http/HttpEntity;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 54
    if-nez p0, :cond_5

    .line 55
    const-string v3, ""

    .line 72
    :cond_4
    :goto_4
    return-object v3

    .line 56
    :cond_5
    invoke-interface {p0}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v0

    .line 57
    .local v0, "compressed":Ljava/io/InputStream;
    new-instance v2, Ljava/util/zip/GZIPInputStream;

    invoke-direct {v2, v0}, Ljava/util/zip/GZIPInputStream;-><init>(Ljava/io/InputStream;)V

    .line 58
    .local v2, "rawData":Ljava/io/InputStream;
    invoke-static {v2}, Lcom/zuiapps/suite/utils/file/IOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;

    move-result-object v3

    .line 59
    .local v3, "results":Ljava/lang/String;
    if-eqz v3, :cond_4

    .line 60
    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "{"

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2c

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "}"

    invoke-virtual {v4, v5}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_4

    .line 62
    :cond_2c
    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "["

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_44

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "]"

    invoke-virtual {v4, v5}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_4

    .line 66
    :cond_44
    :try_start_44
    invoke-interface {p0}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/file/IOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    :try_end_4b
    .catch Ljava/lang/IllegalStateException; {:try_start_44 .. :try_end_4b} :catch_4d

    move-result-object v3

    goto :goto_4

    .line 67
    :catch_4d
    move-exception v1

    .line 68
    .local v1, "e":Ljava/lang/IllegalStateException;
    goto :goto_4
.end method
